<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:w="http://lucidium.net/wixi">

	<xsl:output method="html" indent="yes"/>

	<xsl:include href="base.xsl"/>

	<xsl:template match="w:topic">
		<form id="wixi_form" method="POST">
			<div class="WIXI_SECTION">
				<xsl:apply-templates select="*" />
			</div>
			<div class="WIXI_SECTION">
				<input type="submit" id="wixi_button_save" name="wixi_button_save" value="Save" class="WIXI_BUTTON"/>
			</div>
		</form>
	</xsl:template>

	<xsl:template match="w:field[@type='richtext']">
		<div>
			<textarea id="{@id}" name="{@id}" class="WIXI_FCK_TEXTAREA"/>
			<div>
				<xsl:copy copy-namespaces="yes">
					<xsl:apply-templates select="@*|node()"/>
				</xsl:copy>
			</div>
		</div>
	</xsl:template>

	<xsl:template match="w:field">
		<input id="{@id}" name="{@id}" value="{.}"/>
	</xsl:template>

<!-- This should omit primaryType attributes. It isn't working -->
	<xsl:template match="@primaryType" priority="10"/>

<!-- Identity Transform -->
	<xsl:template match="@*|node()">
		<xsl:copy copy-namespaces="yes">
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>

</xsl:transform>
